<?php
/**
 * Interface for the factory keeper classes
 *
 * Copyright (C) 2008  Sean Hickey
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Sean Hickey <sean@headzoo.com>
 * @version $Id: Interface.php 395 2008-07-04 05:12:54Z sean $
 * @package Alinks_Factory
 */
interface Alinks_Factory_Keeper_Interface
{
	/**
	 * Sets the directory where factories are installed
	 *
	 * @param string $install_path The directory
	 * @return Alinks_Factory_Keeper
	 */
	function setInstallPath($install_path);
	
	/**
	 * Sets the settings for all the factories
	 *
	 * @param array $settings The factory settings
	 * @return Alinks_Factory_Keeper
	 */
	function setFactorySettings(array $settings);
	
	/**
	 * Sets the version of aLinks that is running
	 *
	 * @param string $version The aLinks version
	 * @return Alinks_Factory_Keeper
	 */
	function setAlinksVersion($version);
	
	/**
	 * Returns the set install path
	 *
	 * @return string
	 */
	function getInstallPath();
	
	/**
	 * Returns all the factory settings
	 *
	 * @return array
	 */
	function getFactorySettings();
	
	/**
	 * Returns the version of aLinks that is running
	 *
	 * Returns the value set with setAlinksVersion().
	 *
	 * @return string
	 */
	function getAlinksVersion();
	
	/**
	 * Returns the installed factories
	 *
	 * If $safe_name is specified, then only the factory with that safe
	 * name will be returned.
	 *
	 * @param string $safe_name Factory safe name
	 * @return Alinks_Factory_Interface[]
	 */
	function fetchAll($safe_name = null);
	
	/**
	 * Returns the factories that are incompatible with this
	 * version of aLinks
	 *
	 * @return Alinks_Factory_Interface[]
	 */
	function fetchIncompatible();
}